.row
  .col-lg-3.col-md-6
    .panel.panel-primary
      .panel-heading
        .row
          .col-xs-3
            %i.fa.fa-comments.fa-5x
          .col-xs-9.text-right
            .huge= '26'
            %div= "商品选择框!"
        %a#select_product{href: '#'}
          .panel-footer
            %span.pull-left= "调试"
            %span.pull-right
              %i.fa.fa-arrow-circle-right
            .clearfix

  .col-lg-3.col-md-6
    .panel.panel-primary
      .panel-heading
        .row
          .col-xs-3
            %i.fa.fa-comments.fa-5x
          .col-xs-9.text-right
            .huge= '26'
            %div= "终端选择框!"
        %a#select_machines{href: '#'}
          .panel-footer
            %span.pull-left= "调试"
            %span.pull-right
              %i.fa.fa-arrow-circle-right
            .clearfix

  .col-lg-3.col-md-6
    .panel.panel-primary
      .panel-heading
        .row
          .col-xs-3
            %i.fa.fa-comments.fa-5x
          .col-xs-9.text-right
            .huge= '26'
            %div= "格子选择框!"
        %a#select_grids{href: '#'}
          .panel-footer
            %span.pull-left= "调试"
            %span.pull-right
              %i.fa.fa-arrow-circle-right
            .clearfix

= render partial: 'shared/cpanel/products_modal'
= render partial: 'shared/cpanel/machines_modal'
= render partial: 'shared/cpanel/grids_modal'

:javascript
  $(function(){
    new CPANEL.ProductsModal({
      modal_id: "select_product",
      modal_confirm_callback: function(data){
        console.log(JSON.stringify(data));
        CPANEL.alert_success("商品回调成功");
      }
    });

    new CPANEL.MachinesModal({
      modal_id: "select_machines",
      modal_confirm_callback: function(data){
        console.log(JSON.stringify(data));
        CPANEL.alert_success("终端回调成功");
      }
    });

    new CPANEL.GridsModal({
      modal_id: "select_grids",
      modal_confirm_callback: function(data){
        console.log(JSON.stringify(data));
        CPANEL.alert_success("格子回调成功");
      }
    });
  });
